<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="/static/css/login.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.css"/>
    <link rel="stylesheet" type="text/css" href="/static/css/font-awesome.min.css"/>
    <style>

    </style>
</head>
<body>


<div class="layui-card">
    <div class="layui-card-header">学生信息</div>
    <div class="layui-card-body">
        <form class="layui-form" action="/student/search" method="get">
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="search" name="keyword" placeholder="学生名称" class="layui-input">
                </div>
                <div class="layui-input-inline">
                    <input type="search" name="number" placeholder="学生学号" class="layui-input">
                </div>
                <div class="layui-input-inline">
                    <input type="search" name="class_name" placeholder="班级名称" class="layui-input">
                </div>
                <div class="layui-input-inline">
                    <input type="search" name="dept" placeholder="专业名称" class="layui-input">
                </div>
                <div class="layui-input-inline">
                    <input type="search" name="phone" placeholder="手机号码" class="layui-input">
                </div>
                <div class="layui-input-inline">
                    <button class="layui-btn" lay-submit lay-filter="searchForm">搜索</button>
                </div>
            </div>
        </form>
    <div class="layui-form">
        <table class="layui-table">
                    <tr>
                        <th >ID</th>
                        <th width="100">姓名</th>
                        <th width="100">学号</th>
                        <th width="100">班级</th>
                        <th width="100">手机号码</th>
                        <th width="100">年龄</th>
                        <th width="100">性别</th>
                        <th width="100">专业</th>
                        <th>操作</th>
                    </tr>
                    {% for student in student_list %}
                    <tr>
                        <td>{{ student.id }}</td>
                        <td>{{ student.name }}</td>
                        <td>{{ student.number }}</td>
                        <td>{{ student.class_name }}</td>
                        <td>{{ student.phone }}</td>
                        <td>{{ student.age }}</td>
                        <td>{{ student.sex }}</td>
                        <td>{{ student.dept }}</td>
                        <td>
                            <button type="button" class="layui-btn layui-btn-sm "><a href="/student/edit?option=detail&id={{ student.id }}">详情</a></button>
                            <button type="button" class="layui-btn layui-btn-sm layui-btn-normal"><a href="/student/edit?option=update&id={{ student.id }}">编辑</a></button>
                            <button type="button" class="layui-btn layui-btn-sm layui-btn-danger"><a href="/student/remove?id={{ student.id }}">删除</a></button>
                        </td>
                    </tr>
                    {% endfor %}
                </table>
    </div>

    </div>
</div>

    <link rel="stylesheet" href="/static/layui/css/layui.css" type="text/css">
    <script src="/static/layui/layui.js" type="text/javascript"></script>
</body>
</html>